package example;

import java.util.concurrent.TimeUnit;

import com.yammer.metrics.Metrics;
import com.yammer.metrics.core.Meter;
 
/**
 * TODO
 * @author scutshuxue.chenxf
 */
public class TestMeters {
        private static Meter meter = Metrics.newMeter(TestMeters.class, "requests","requests", TimeUnit.SECONDS);
 
        public static void main(String[] args) throws InterruptedException{
              
               while(true){
                       meter.mark();
                       meter.mark();
                       System.out.println(meter.oneMinuteRate());
                       Thread.sleep(1000);
               }
        }
}